#pragma once
#include <GL\glut.h>

enum SpecialKey
{
	F1 = GLUT_KEY_F1,
	F2 = GLUT_KEY_F2,
	F3 = GLUT_KEY_F3,
	F4 = GLUT_KEY_F4,
	F5 = GLUT_KEY_F5,
	F6 = GLUT_KEY_F6,
	F7 = GLUT_KEY_F7,
	F8 = GLUT_KEY_F8,
	F9 = GLUT_KEY_F9,
	F10 = GLUT_KEY_F10,
	F11 = GLUT_KEY_F11,
	F12 = GLUT_KEY_F12,
	Left = GLUT_KEY_LEFT,
	Right = GLUT_KEY_RIGHT,
	Up = GLUT_KEY_UP,
	Down = GLUT_KEY_DOWN,
	PageUp = GLUT_KEY_PAGE_UP,
	PageDown = GLUT_KEY_PAGE_DOWN,
	Home = GLUT_KEY_HOME,
	End = GLUT_KEY_END,
	Insert = GLUT_KEY_INSERT,
	ESC = 27
};

class Keyboard
{
public:
	Keyboard(void);
	~Keyboard(void);

	void UpdateKeyDown(unsigned char key);
	void UpdateKeyUp(unsigned char key);
	void UpdateSpecialKeyDown(int key);
	void UpdateSpecialKeyUp(int key);
	bool IsSpecialKeyDown(SpecialKey key);
	bool IsKeyDown(char key);

private:
	const static unsigned short keyArraySize = 256;
	bool keyState[keyArraySize];
	const static unsigned short specialKeyArraySize = 110;
	bool specialKeyState[specialKeyArraySize];
};

